/**
 * Created by solaman on 2017/5/4.
 */
//打开devetools
Vue.config.devtools = true

var app = new Vue({
    el: '#root',
    data: {
        newName: '',
        names: ['joe', 'Mary', 'Jane', 'Jack']
    },
    methods: {
        addName(){
            this.names.push(this.newName);
            this.newName = '';
        }
    }

})